package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.OffStateService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrcomponent.integration.FwCompOffStateClient;
import com.wicket.okrcomponent.integration.dto.QueryStepListComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryStepListComReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrcomponent.integration.dto.QueryStepDetailRespDto;
import com.wicket.okrcomponent.integration.dto.QueryStepDetailReqDto;
import com.wicket.okrframework.integration.FwBaseAppSceneClient;
import com.wicket.okrframework.integration.dto.QueryBizSceneDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryBizSceneDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.AddStepRespDto;
import com.wicket.okrcomponent.integration.dto.AddStepReqDto;
import com.wicket.okrcomponent.integration.dto.UpdateStepRespDto;
import com.wicket.okrcomponent.integration.dto.UpdateStepReqDto;
import com.wicket.okrapp.integration.FwAppOffStateClient;
import com.wicket.okrapp.integration.dto.QueryCheckItemListRespDto;
import com.wicket.okrapp.integration.dto.QueryCheckItemListReqDto;
import com.wicket.okrapp.integration.dto.QueryCheckItemDetailRespDto;
import com.wicket.okrapp.integration.dto.QueryCheckItemDetailReqDto;
import com.wicket.okrapp.integration.dto.AddCheckItemRespDto;
import com.wicket.okrapp.integration.dto.AddCheckItemReqDto;
import com.wicket.okrapp.integration.dto.UpdateCheckItemRespDto;
import com.wicket.okrapp.integration.dto.UpdateCheckItemReqDto;
import com.wicket.okrapp.integration.dto.QueryFuseTargetCheckItemNodeStatusListRespDto;
import com.wicket.okrapp.integration.dto.QueryFuseTargetCheckItemNodeStatusListReqDto;
import com.wicket.okrapp.integration.dto.BatchQueryCheckItemRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryCheckItemReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffTargetCheckItemStatusDto;
import com.wicket.okrpbff.biz.service.dto.common.BffTargetNodeStatusDto;
import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrapp.integration.dto.ImplementCheckItemRespDto;
import com.wicket.okrapp.integration.dto.ImplementCheckItemReqDto;
import com.wicket.okrapp.integration.dto.BizAppCheckItemStatDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "OffState", tags = {"OffState"})
@RestController
// @RequestMapping("/poms/offState/")
public class OffStateController {
    @Autowired
    OffStateService offStateService;

    /**
   * B2-9查询步骤列表（平台）
   * gen by moon at 8/10/2022, 3:42:29 AM
   */
    @PostMapping("/oms/platform/offState/queryStepList")
    @ApiOperation(value = "B2-9查询步骤列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStepListRespDto> queryStepList(@RequestBody(required=false) @Validated BffQueryStepListReqDto reqDTO){
        return OkrResult.success(offStateService.queryStepList(reqDTO));
    }

    /**
   * B3-11修改检查项（平台）
   * gen by moon at 11/15/2022, 11:38:14 PM
   */
    @PostMapping("/oms/platform/offState/updateCheckItem")
    @ApiOperation(value = "B3-11修改检查项（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateCheckItemRespDto> updateCheckItem(@RequestBody(required=false) @Validated BffUpdateCheckItemReqDto reqDTO){
        return OkrResult.success(offStateService.updateCheckItem(reqDTO));
    }

    /**
   * B3-11新增检查项（平台）
   * gen by moon at 11/15/2022, 11:38:13 PM
   */
    @PostMapping("/oms/platform/offState/addCheckItem")
    @ApiOperation(value = "B3-11新增检查项（平台）", response = OkrResult.class)
    public OkrResult<BffAddCheckItemRespDto> addCheckItem(@RequestBody(required=false) @Validated BffAddCheckItemReqDto reqDTO){
        return OkrResult.success(offStateService.addCheckItem(reqDTO));
    }

    /**
   * B3-11查询检查项详情（平台）
   * gen by moon at 8/10/2022, 3:42:46 AM
   */
    @PostMapping("/oms/platform/offState/queryCheckItemDetail")
    @ApiOperation(value = "B3-11查询检查项详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryCheckItemDetailRespDto> queryCheckItemDetail(@RequestBody(required=false) @Validated BffQueryCheckItemDetailReqDto reqDTO){
        return OkrResult.success(offStateService.queryCheckItemDetail(reqDTO));
    }

    /**
   * B3-11查询检查项列表（平台）
   * gen by moon at 8/10/2022, 3:42:42 AM
   */
    @PostMapping("/oms/platform/offState/queryCheckItemList")
    @ApiOperation(value = "B3-11查询检查项列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryCheckItemListRespDto> queryCheckItemList(@RequestBody(required=false) @Validated BffQueryCheckItemListReqDto reqDTO){
        return OkrResult.success(offStateService.queryCheckItemList(reqDTO));
    }

    /**
   * B2-9修改步骤
   * gen by moon at 8/10/2022, 3:42:40 AM
   */
    @PostMapping("/oms/platform/offState/updateStep")
    @ApiOperation(value = "B2-9修改步骤", response = OkrResult.class)
    public OkrResult<BffUpdateStepRespDto> updateStep(@RequestBody(required=false) @Validated BffUpdateStepReqDto reqDTO){
        return OkrResult.success(offStateService.updateStep(reqDTO));
    }

    /**
   * B2-9新增步骤
   * gen by moon at 8/10/2022, 3:42:37 AM
   */
    @PostMapping("/oms/platform/offState/addStep")
    @ApiOperation(value = "B2-9新增步骤", response = OkrResult.class)
    public OkrResult<BffAddStepRespDto> addStep(@RequestBody(required=false) @Validated BffAddStepReqDto reqDTO){
        return OkrResult.success(offStateService.addStep(reqDTO));
    }

    /**
   * B2-9查询步骤详情（平台）
   * gen by moon at 8/10/2022, 3:42:33 AM
   */
    @PostMapping("/oms/platform/offState/queryStepDetail")
    @ApiOperation(value = "B2-9查询步骤详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStepDetailRespDto> queryStepDetail(@RequestBody(required=false) @Validated BffQueryStepDetailReqDto reqDTO){
        return OkrResult.success(offStateService.queryStepDetail(reqDTO));
    }
/**
   * B3查询融合目标检查项父子状态列表(管理)
   * gen by moon at 10/20/2022, 10:07:02 AM
   */
    @PostMapping("/oms/mgt/offState/queryFuseTargetCheckItemNodeStatusList")
    @ApiOperation(value = "B3查询融合目标检查项父子状态列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryFuseTargetCheckItemNodeStatusListRespDto> queryFuseTargetCheckItemNodeStatusList(@RequestBody(required=false) @Validated BffQueryFuseTargetCheckItemNodeStatusListReqDto reqDTO){
        return OkrResult.success(offStateService.queryFuseTargetCheckItemNodeStatusList(reqDTO));
    }

}

